<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title><%= article.title %> - WDShare</title>
<% include ../../etc/htmlhead.ejs %>
</head>

<body>
<% include ../../etc/head.ejs %>

<input id="js-archives-id" type="hidden" value="<%= article._id %>" />
<input id="js-archives-model" type="hidden" value="article" />
<div class="article">
  <div class="maxWidth module">
    <% if ( !article.audit ) { %>
    <div class="inform" style="padding:0 0 40px;">
      <p class="inform-con" style="padding:20px"><strong class="red">注意：</strong>该文章暂未审核，审核后才会出现在官网！</p>
    </div>
    <% } %>

    <div class="article-head">
      <h1 class="article-title"><%= article.title %> <a href="#comment" class="article-top-comment-link" style="font-size:16px; font-weight:normal; padding-left:30px;">反馈总数：<span class="js-comment-count">-</span></a></h1>
    </div>
    <div id="js-description"><%= article.description %></div>
    <div class="article-con" id="article-detail">
      <%- article.content %>
    </div>

    <% if ( configIsComment && article.isComment ) { %>
    <!--  Comment  -->
    <div class="comment" id="js-comment">
      <h1>反馈列表</h1>
      <div class="comment-add">
        <% if ( user ) { %>
          <% if ( user.username.indexOf("@") > -1 ) { %>
            <div class="comment-not-login">先给自己一个昵称吧 <a href="/user/">点击设置昵称</a></div>
          <% } else { %>
            <a name="comment"></a>
            <form id="js-comment-form" name="comment-form" method="post">
              <input type="hidden" name="typeid" value="<%= article._id %>" />
              <input type="hidden" name="model" value="article" />
              <input type="hidden" name="title" value="<%= article.title %>" />
              <input type="hidden" name="privacy" value="0" />
              <div class="comment-form-box">
                <div class="comment-form-user"><img src="/user/face/<%=user._id %>" title="<%=user.username %>" /></div>
                <div class="comment-form-body">
                  <textarea name="content" placeholder="请输入评论内容，遵纪守法就是好公民！"></textarea>
                  <% if ( captcha && captcha === true ) { %>
                  <div class="comment-form-code"><input type="text" name="code" placeholder="验证码" /> <img id="code" src="/captcha/get" onclick="this.src +='?'+new Date().getTime(); return false;" title="点击刷新验证码" /></div>
                  <% } %>
                  <div class="comment-form-but">
                    <input type="submit" class="but-blue" name="button" value="提交" />
                  </div>
                </div>
              </div>
            </form>
          <% } %>
        <% } else { %>
          <a name="comment"></a>
          <div class="comment-not-login">
            只有WDShare成员才能发表评论。 <br />
            请 <a href="/user/login" onclick="if ( window.location.href.indexOf('referer') < 0 ) { window.location='/user/login?referer='+window.location.href; } else {window.location='/user/login?'+window.location.href.substring(window.location.href.indexOf('referer'));} return false;">登录</a> 或者 <a href="/user/register" onclick="if ( window.location.href.indexOf('referer') < 0 ) { window.location='/user/register?referer='+window.location.href; } else {window.location='/user/register?'+window.location.href.substring(window.location.href.indexOf('referer'));} return false;">注册</a> 后发表评论！
          </div>
        <% } %>
      </div>
      <div class="comment-list" id="js-comment-list">
        数据加载中...
      </div>
    </div>
    <!--  Comment End  -->
    <% } %>
  </div>
</div>

<% include ../../etc/foot.ejs %>
</body>
</html>